Recover License Authorization Definitions

SoftwareShield System Feature Guide > Authorization Definitions > Authorization Definition Types > Recover License Authorization Definitions

## Recover License Authorization Definitions

A Recover License Authorization Definition specifically allows your customer to recover from an inconsistent license state (usually brought on by them inadvertently or accidentally tampering with or deleting the license file or alias files, or registry keys or in some scenarios un-installing and reinstalling the software). In most situations this represents a customer who is deliberately trying to defeat your security. However, in many cases you may need to give them the benefit of the doubt and have a remedy for the customer who really didn't intend to delete that file or fool with his registry.

Once activated, the code essentially cleans the clients machine of all alias files. However, it does not modify the main license file. This allows you to recover the previous state of the license if the main license file is intact.

If however, the customer has permanently deleted the main license file or somehow corrupted it, you will have to follow this procedure to recover their system.

1. Deliver (email) them a new copy of the main license file (that includes a Recover License Authorization Definition in it) and instruct them to place it in the Main License File directory (overwriting the old one if prompted).

2. When they start the application (depending on your license settings) the ClientProtector will either Auto-Recover, Auto-Replace the Main License File or will fire the OnAttemptRecover event back to your application.

3. If your license is configured to Prompt to Recover License, your application will receive the event notification. Your application should handle the event as it would normally, thus allowing for a recovery Activation Code to be input.

One other important consideration is if the license uses a steganographic alias file, ensure the customer has not deleted that too. As long as it is still in the directory, the code will recover the system.

The Activation Code that is generated for a Recover License Authorization Definition does give you the option of using a shelf-life. The resulting Activation Code must be used within the shelf-life after the date it has been issued, or the code itself will expire and will cease to work. Note you can override the shelf-life you defined when you created the license at the time you generate an Activation Code with the Manual-Activator.

The Activation Code that is generated for a Recover License Authorization Definition is a "single-use" code by default. If single-use is enabled, they can only be used once. However, note that you may reissue it to the same customer on another day, and the code will be different (due to the embedded shelf-life date) and therefore may be used by the customer. You have the option of turning off single-use when you define your license, but do not have the option of overriding it later.

Recover License Authorization Definitions do not require a parameter to be sent (explicitly or implicitly).

Recover License Authorization Definitions can be used as a payload for either type of Composite Authorization Definitions.

### When To Use A Recover License Authorization Definition

We recommend that you always define a Recover License Authorization Definition in your licenses. If you never use it, then there is no trouble. However, if you do need it one day, you will be happy you included the definition in the main license file. If alias files are damaged or missing but the main license file is intact, this allows you to recover the clients system simply by issuing them an Activation Code. Note that even if you do forget to include a Recover License in your license, you could potentially recover from an inconsistent license state by recreating the same license with a newly defined Recover License Code inside it, as well as ensuring Auto-Recover is enabled.

NOTE: To allow your user input a Recover License Activation Code you must have:

1. Defined a Recover License Authorization Definition in the license

2. Have the license configured to Prompt To Recover

3. Handle the OnAttemptRecover event from the ClientProtector.

### More Information

For help in understanding License Recovery issues including Auto-Recover, Auto-Main-License-File-Replacement, Prompting for Recovery and more - see License Recovery in this feature reference.

For help in actually creating a Recover License Authorization Definition, please see Authorization Definition Dialog in the SoftwareShield License Manager Reference.

For help in responding to the ClientProtector event OnAttemptRecover, see Creating a ClientProtector COM Event Sink.